tar xf ${DOWNLOADDIR}/libffi-3.5.2.tar.gz -C ${BUILDDIR}
pushd ${BUILDDIR}/libffi-3.5.2
        autoreconf -v -i
	CFLAGS="${CFLAGS} -Wno-implicit-function-declaration -mcmodel=medium" \
	./configure --prefix=/usr --libdir=/usr/lib64 --build=${CROSS_HOST} \
	            --host=${CROSS_TARGET} --disable-static --with-gcc-arch=native
	make ${JOBS}
	make DESTDIR=${SYSDIR}/sysroot install
	cp -a ${CROSS_TARGET}/.libs/libffi_convenience.a ${SYSDIR}/sysroot/usr/lib64/libffi_pic.a
popd
